globals
Variables Timm Mar10 Sandbox Revised

Defining Globals

Problem
=======

How to keep track of all the globals that change value.

Solution
========

Write a function that resets all the globals to some initial values.

Code
====

 function globals() {
     Patience=20
	 Program="ACB"
 }
 

Discussion
==========

Globals are bad and _N-1_ globals is always better than _N_.  The above code drops concepts into
a global space and imposes constraints on every function in the AWK cookbook. So this above list
should be kept to a minimum.

In the above:

+ _Patience_ : is an error counter. Everytime we see a warning, _Patience_ is decremented by one. If we run out of _Patience_, the program quits.
+ _Program_ : is a string to print in front of every warning, error message.

Note that:
+ The above globals are _not_ defined unless this code is called. So if you do not like these settings, write another _myGlobals_ function.

Author
======

Tim Menzies

